package com.atguigu.gmall.index.annotation;


import java.lang.annotation.*;

@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface GmallCache {

    //缓存前缀默认gmall:
    String prefix() default "gmall:";
    //缓存过期时间默认30min
    int timeout() default 30;
    //为了防止缓存雪崩，添加随机值
    int random() default 10;
    //为了防止缓存击穿，添加锁，锁名默认为lock:
    String lock() default "lock:";
}
